<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('videoSchedule')} > ${i18n.getMessage('edit')}">
	<a href="#" onclick="cc('offering/showListVideoSchedule.sgt?offeringId=${(schedule.offering.id)!}')">${i18n.getMessage('list')}</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${(schedule.offering.id)!}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<div id="error" style="display:none"></div>

<form action="offering/editVideoSchedule.sgt" validator="offering/validateVideoSchedule.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<input type="hidden" name="offeringId" value="${schedule.offering.id}"/>
	<input type="hidden" name="id" value="${schedule.id}"/>
	
	<table id="dataTable" align="center" cellspacing="5" cellpadding="0">
		<tr>
			<td class="name"><@required/>${i18n.getMessage('class')}:</td>
			<td><input type="text" value="${(schedule.offering.name)!}" disabled style="width:200px"/></td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('date')}:</td>
			<td><input type="text" name="date" value="${(schedule.date)!}" style="width:200px"/><img class="calendarImg" src="images/calendar/calendar.gif" onclick="displayCalendar(document.forms[0].date, '${i18n.getMessage('format.date')}', this)"/></td>
		</tr>
		<tr>
			<td class="name"><@required/>Video's name:</td>
			<td>
				<select id="videoName" name="videoName" style="width:204px">
					<#list 1..6 as i>
						<option value="${i18n.getMessage('video')} ${i}" <#if (i == (schedule.videoNumber)!)>selected</#if>>${i18n.getMessage('video')} ${i}</option>
					</#list>
				</select>
			</td>
		</tr>
		<tr>
			<td class="name" style="vertical-align:top">${i18n.getMessage('comment')}:</td>
			<td><textarea name="comment" style="width:300px;height:80px">${(schedule.comment)!}</textarea></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<input type="submit" value="${i18n.getMessage('edit')}" class="button_style"/> 
				<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/> 
			</td>
		</tr>
	</table>
</form>

<script>
	$('error').hide();
</script>